import java.util.Scanner;

public class Demo1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            float a = in.nextInt();
            String input = in.next();
            int ret = payFun(a,input);
            System.out.println(ret);
        }
    }

    public static int payFun(float weight,String push) {
        int money = 20;
        weight -= 1;
        while(weight > 0) {
            money += 1;
            weight -=1;
        }
        if(push.equals("y") || push.equals("Y")) {
            money += 5;
        }
        return money;
    }
}
